package com.briup.corejava.day22;

import com.briup.corejava.day14.FirstAnno;

public class Circle<T,E>{

    @FirstAnno(value="x变量",type = {"1","2","3"})
    private T x;
    private T y;
    private E radius;

    public Circle(T x, T y){
        this.x = x;
        this.y = y;
    }
    @FirstAnno(value = "show方法")
    public void show(){
        System.out.println("("+x+","+y+")");
    }

    public void setRadius(E radius) {
        this.radius = radius;
    }

    public void run(T o) {
        if(o instanceof Integer && radius instanceof Integer){
            Integer n1 = (Integer) o;
            Integer n2 = (Integer) radius;
            System.out.println(n1*n1*n2);
        }else {
            System.out.println(o);
            System.out.println(radius);
        }
    }
}
